package com.panfeng.xcloud.dao.utils;

import io.shardingsphere.core.keygen.DefaultKeyGenerator;

/**
 * 主键生成工具
 */
public class IdGenerateUtils {

    private static final DefaultKeyGenerator DEFAULT_KEY_GENERATOR = new DefaultKeyGenerator();

    /**
     * sharding jdbc key生成
     * @return
     */
    public static long keyGenerator(){
        return DEFAULT_KEY_GENERATOR.generateKey().longValue();
    }
}
